//const commonUrl='http://111.231.109.117:8080/';
//const commonUrl = 'http://150.221.79.143:8080/'
const commonUrl = 'https://www.ichangbanmini.com/';
const app = getApp();
function request(url,params) {
    var promise=new Promise(function (resolve,reject) {
        wx.request({
            url:commonUrl+""+url,
            data:params,
            success:resolve,
            fail:reject,
            method:"POST",
            header:{
                'content-type': 'application/x-www-form-urlencoded',
                'Cookie': 'JSESSIONID=' + app.globalData.header,
            }
        })
    })
    return promise;
}



module.exports={
    request:request,
    commonUrl: commonUrl
}
